<?php
  
  class mySOAForm extends sfForm{
    public function configure(){
      $this->setWidgets(
        array(
          'owner_iden' =>  new sfWidgetFormSelect(array('choices'=>AccountOwnerPeer::getList(),)),
          'customer_iden' => new sfWidgetFormInputHidden(),
          'date_from' => new sfWidgetFormDate(),
          'date_to' => new sfWidgetFormDate(),
        )
      );
      
      $this->setValidators(array(
        'owner_iden' => new sfValidatorString(array('required'=>true,)),
        'customer_iden' => new sfValidatorString(array('required'=>true,)),
        'date_from' => new sfValidatorString(array('required'=>true,)),
        'date_to' => new sfValidatorString(array('required'=>true,)),
      ));
      
      $this->widgetSchema->setLabels(
        array(
          'owner_iden' => 'Owner:',
          'date_from' => 'From:',
          'date_to' => 'To:',
        )
      );
      
      $this->widgetSchema->setNameFormat('rkey_SOA[%s]');
      
    }
  }